home *** CD-ROM | disk | FTP | other *** search
- #include "stdafx.h"
-
- cInflamable::cInflamable(int _x, int _y, cProperties *_orig)
- : cWeapon(_x, _y, _orig, "MOVING")
- {
- orig->get_sequence("ON FIRE", on_fire_seq);
-
- move_object_after_hit = FALSE;
-
- ASSERT(!inflamable_contents_list.is_empty());
- }
-
- cInflamable::~cInflamable()
- {
- }
-
- int cInflamable::control()
- {
- cWeapon::control();
-
- bounce_on_boundaries();
-
- // Check if we fell onto something
-
- if (resting && explode)
- {
- cHurting *h = new cHurting(x, y, inflamable_contents_list.get_random());
-
- h->set_position(x, y);
- h->make_dirty();
-
- return FALSE;
- }
-
- return !in_water();
- }
-
- void cInflamable::hit(fix, cWeapon *)
- {
- explode = TRUE;
-
- set_sequence(on_fire_seq, TRUE);
- }
-